from typing import *


class Solution:

    def minimumFuelCost(self, roads: List[List[int]], seats: int) -> int:
        ans = 0
        n = len(roads) + 1
        nexts = [[] for _ in range(n)]
        for a, b in roads:
            nexts[a].append(b)
            nexts[b].append(a)

        def f(p, c):
            tot = 1
            nonlocal ans
            for next in nexts[c]:
                if p != next:
                    s = f(c, next)
                    ans += (s + seats - 1) // seats
                    tot += s
            return tot

        f(-1, 0)
        return ans

from random import *

def ra():
    a = 46.16
    s = a
    b = 0
    k = 2

    while a < 52:
        k = randint(0,3)
        f = randint(0,1)
        if f == 1:
            a *= (1 + k / 100)
        else:
            a *= (1 - k / 100)
        b += 1
        if f == 1:
            print(f"第{b}天,{k}%，{round(a, 2)}")
        else:
            print(f"第{b}天,-{k}%，{round(a, 2)}")

def love():
    a = 46.17
    b = 0
    while a < 52:
        a += 0.015 * a
        b += 1
        print(f"第{b}天，{round(a, 2)}")
love()

